package com.xianggu.mybatis;

import com.xianggu.mybatis.annotation.*;
import com.xianggu.mybatis.enums.SqlExecuteTypeEnum;
import com.xianggu.mybatis.headlerImpl.*;
import com.xianggu.mybatis.mapper.MyBatisSqlParser;
import com.xianggu.mybatis.mapper.entry.MybatisSqlVo;
import com.xianggu.mybatis.mysql.DruidExample;
import com.xianggu.mybatis.paging.Page;
import com.xianggu.mybatis.proxyFactory.MybatisProxyFactory;
import com.xianggu.mybatis.utils.SqlParserTool;
import com.xianggu.mybatis.utils.TypeHandler;
import com.xianggu.spring.transaction.context.TransactionContext;

import java.lang.reflect.*;
import java.math.BigDecimal;
import java.sql.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @author chengjy
 * @date 2025/3/5
 */
public class MapperProxyFactory {

    public static <T> T getMapperr(Class<T> mapper) {
        // 生成动态代理对象
        return (T) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{mapper}, new MybatisProxyFactory());
    }
}
